
#ifndef _BSP_BEEP_H
#define _BSP_BEEP_H

#ifdef __cplusplus
extern "C" {
#endif


#define BSP_BEEP_TIMBASE                                        TIM1
#define BSP_BEEP_TIMBASE_NAME                                   "TIM1"
#define BSP_BEEP_TIMBASE_IRQn                                   TIM1_IRQn
#define BSP_BEEP_TIMBASE_IRQHandler                             TIM1_IRQHandler
#define BSP_BEEP_TIMBASE_CLK_ENABLE()                           __HAL_RCC_TIM1_CLK_ENABLE()

#define BSP_BEEP_PORT                                           GPIOD
#define BSP_BEEP_PIN                                            GPIO_PIN_6
#define BSP_BEEP_CLKENABLE()                                    __HAL_RCC_GPIOD_CLK_ENABLE()
#define BSP_BEEP_FUN                                            GPIO_AF_MODE_3
#define BSP_BEEP_PWM_CHANNEL                                    TIM_CHANNEL_4




#define BSP_BEEP_TIMBASE_CONFIG_TIMBASE_FREQ                     4000

#define BSP_BEEP_PERIOD                                          250

void bsp_beep_init(void);
void bsp_beep_open(void);
void bsp_beep_close(void);
void bsp_beep_setfreq(uint32_t freq);
#ifdef __cplusplus
}
#endif

#endif /* __ZB32L03x_STARTERKIT_H */


